﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="AddPoliceStation.aspx.cs" Inherits="AddPoliceStation" Theme="Theme1"%>



<asp:Content ID="content1" runat="server" ContentPlaceHolderID="MainContentPlaceHolder">

    
    <div style="text-align: center">
      <table width="800" border="0" cellspacing="0" cellpadding="0" style="background-color:#ffffff">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>
              <table cellpadding="0" cellspacing="0" 
                  style="width: 718px; vertical-align: top; background-color: #C0C0C0;">
                  <tr>
                      <td class="style1" style="vertical-align: top">
                          <table cellpadding="0" cellspacing="0" style="width: 188px">
                              <tr>
                                  <td>
                                      <a href= "AddDistrict.aspx"> District Details</a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a href="AddCircle.aspx"> Circle Details</a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a href= "AddPoliceStation.aspx"> PoliceStation Details</a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                               <a href="anonymous/GenerateFIR.aspx"> GenerateFIR </a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a href="WitnessDetails.aspx">Witness Details</a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a href="AddMurderDetail.aspx">Murder Record</a></td>
                                        </tr>
                                       <tr>
                                       <td >
                                       <a href ="FIRDetails.aspx" >FIR Records</a>
                                       
                                       </td>
                                       </tr>
                                    </table>
                                </td>
                                <td>
                                    <table cellpadding="0" cellspacing="0" 
                                        style="width: 476px; background-color: #FFFFCC;">
                                        <tr>
                                            <td colspan="2">
                                                <asp:Label ID="Label1" runat="server" BackColor="#666699" ForeColor="White" 
                                                    SkinID="Label2" style="font-weight: 700; font-style: italic; font-size: large" 
                                                    Text="PoliceStation Details" Width="518px"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style3" colspan="2">
                                                <asp:SqlDataSource ID="PoliceStationSqlDataSource" runat="server" 
                                                    ConnectionString="<%$ ConnectionStrings:PAS_DB %>" 
                                                    DeleteCommand="DELETE FROM [PoliceStationTab] WHERE [SNo] = @SNo" 
                                                    InsertCommand="INSERT INTO [PoliceStationTab] ([TCode], [TName], [CCode], [InchgName]) VALUES (@TCode, @TName, @CCode, @InchgName)" 
                                                    SelectCommand="SELECT * FROM [PoliceStationTab]" 
                                                    UpdateCommand="UPDATE [PoliceStationTab] SET [TCode] = @TCode, [TName] = @TName, [CCode] = @CCode, [InchgName] = @InchgName WHERE [SNo] = @SNo">
                                                    <DeleteParameters>
                                                        <asp:Parameter Name="SNo" Type="Int32" />
                                                    </DeleteParameters>
                                                    <UpdateParameters>
                                                        <asp:Parameter Name="TCode" Type="Int32" />
                                                        <asp:Parameter Name="TName" Type="String" />
                                                        <asp:Parameter Name="CCode" Type="Int32" />
                                                        <asp:Parameter Name="InchgName" Type="String" />
                                                        <asp:Parameter Name="SNo" Type="Int32" />
                                                    </UpdateParameters>
                                                    <InsertParameters>
                                                        <asp:Parameter Name="TCode" Type="Int32" />
                                                        <asp:Parameter Name="TName" Type="String" />
                                                        <asp:Parameter Name="CCode" Type="Int32" />
                                                        <asp:Parameter Name="InchgName" Type="String" />
                                                    </InsertParameters>
                                                </asp:SqlDataSource>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style4" colspan="2">
                                                <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" 
                                                    AutoGenerateRows="False" DataKeyNames="SNo" DataSourceID="PoliceStationSqlDataSource" 
                                                    Height="50px" Width="249px" CellPadding="4" ForeColor="#333333" 
                                                    GridLines="None">
                                                    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                                    <CommandRowStyle BackColor="#FFFFC0" Font-Bold="True" />
                                                    <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                                                    <FieldHeaderStyle BackColor="#FFFF99" Font-Bold="True" />
                                                    <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                                                    <Fields>
                                                        <asp:BoundField DataField="SNo" HeaderText="SNo" InsertVisible="False" 
                                                            ReadOnly="True" SortExpression="SNo" />
                                                        <asp:BoundField DataField="TCode" HeaderText="PoliceStation Code" SortExpression="TCode" />
                                                        <asp:BoundField DataField="TName" HeaderText="PoliceStation Name" SortExpression="TName" />
                                                        <asp:BoundField DataField="CCode" HeaderText="Circle Code" SortExpression="CCode" />
                                                        <asp:BoundField DataField="InchgName" HeaderText="Incharge Name" 
                                                            SortExpression="InchgName" />
                                                        <asp:CommandField ShowEditButton="True" ShowInsertButton="True" />
                                                    </Fields>
                                                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                                    <AlternatingRowStyle BackColor="White" />
                                                </asp:DetailsView>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style4">
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td class="style4">
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td class="style4">
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
            </td>
        </tr>
        </table>
    </div>
</asp:Content>